#pragma once

#include "LayerBase.h"
#include "CommonUiUtil.h"
#include "ui/UIListView.h"
#include "ui/UIButton.h"

class CLayerSkill : public CLayerBase {
public:
	CLayerSkill(void);
	virtual ~CLayerSkill(void);
	CREATE_FUNC(CLayerSkill);

	bool init() override;
	virtual void onEnter() override;
	//virtual void onExit() override;
	//virtual void update(float delta) override;
private:
	void onClose(cocos2d::Ref* pSender, cocos2d::ui::TouchEventType type);

	void onBInit(cocos2d::Ref* pSender, cocos2d::ui::TouchEventType type);
	void onBUp(cocos2d::Ref* pSender, cocos2d::ui::TouchEventType type);
	void onBDown(cocos2d::Ref* pSender, cocos2d::ui::TouchEventType type);
	void onBUpgrade(cocos2d::Ref* pSender, cocos2d::ui::TouchEventType type);

	void onLInit(cocos2d::Ref* pSender, cocos2d::ui::TouchEventType type);
	void onLUpgrade(cocos2d::Ref* pSender, cocos2d::ui::TouchEventType type);
private:
	cocos2d::Node*				m_Skill;
	cocos2d::ui::Button*		m_Close;

	CCommonUiUtil::VecNode_t	m_BListItems;
	cocos2d::ui::ListView*		m_BList;
	cocos2d::ui::Button*		m_BInit;
	cocos2d::ui::Button*		m_BUp;
	cocos2d::ui::Button*		m_BDown;
	cocos2d::ui::Button*		m_BUpgrade;

	CCommonUiUtil::VecNode_t	m_LListItems;
	cocos2d::ui::ListView*		m_LList;
	cocos2d::ui::Button*		m_LInit;
	cocos2d::ui::Button*		m_LUpgrade;
};

